package com.Hsu.book.controller;

import com.Hsu.book.model.BookInfo;
import com.Hsu.book.model.Result;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Hsu琛君珩
 * @ClassName:TestController
 * @date 2024-01-13
 * @apiNote
 * @Version: v1.0
 */

@RequestMapping("/test")
@RestController
public class TestController {
    @RequestMapping("t1")
    public Boolean t1(){
        int a=1/0;
        return true;
    }

    @RequestMapping("t2")
    public Integer t2(){
        String a=null;
        System.out.println(a.length());
        return 123;
    }

    @RequestMapping("t3")
    public String t3(){
        int[] a={1,2,3};
        System.out.println(a[5]);
        return "hello";
    }

    @RequestMapping("t4")
    public BookInfo t4(){
        return new BookInfo();
    }

    @RequestMapping("t5")
    public Result t5(){
        return Result.success("success");
    }
}
